/*
** parser.h for parser's header in /home/ricard_v//rack/zappy
** 
** Made by vincent ricard
** Login   <ricard_v@epitech.net>
** 
** Started on  Sat Jul  2 17:09:15 2011 vincent ricard
** Last update Sun Jul 10 22:23:21 2011 vincent ricard
*/

#ifndef			__PARSER_H__
# define		__PARSER_H__

# define	PORT		"-p"
# define	MAP_HEIGHT	"-x"
# define	MAP_WIDTH	"-y"
# define	TEAM_NAMES	"-n"
# define	NB_CLIENTS	"-c"
# define	TIME_SPEED	"-t"

typedef	struct		s_server_params
{
  int			port;
  int			x;
  int			y;
  char			**team;
  int			nb_clients;
  int			time;
  int			flag;
}			t_server_params;

char			**args_to_tab(char **, int );

void			aff_error(char *);
void			*xmalloc(size_t);
void			parser(t_server_params *, char **, int);
void			check_params(t_server_params *);
void			*xmalloc(size_t);

#endif			/* __PARSER_H__ */
